import json, gzip, sys
from collections import Counter
filename = sys.argv[1]

ff = gzip.open(filename,'r')
qq = Counter(json.loads(ff.readline()))
zz = qq.most_common()
print "most common: ", zz[:20]
print "least common: ", zz[-20:]


